home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / bigtol1g / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-08-22  |  2.5 KB  |  89 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Note Pad"
  5.    ClientHeight    =   3195
  6.    ClientLeft      =   165
  7.    ClientTop       =   735
  8.    ClientWidth     =   4920
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3195
  11.    ScaleWidth      =   4920
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.TextBox Text1 
  14.       Appearance      =   0  'Flat
  15.       BeginProperty Font 
  16.          Name            =   "Courier New"
  17.          Size            =   8.25
  18.          Charset         =   0
  19.          Weight          =   400
  20.          Underline       =   0   'False
  21.          Italic          =   0   'False
  22.          Strikethrough   =   0   'False
  23.       EndProperty
  24.       Height          =   1935
  25.       Left            =   240
  26.       MultiLine       =   -1  'True
  27.       ScrollBars      =   3  'Both
  28.       TabIndex        =   0
  29.       Text            =   "Form1.frx":0000
  30.       Top             =   480
  31.       Width           =   2775
  32.    End
  33.    Begin MSComDlg.CommonDialog CommonDialog1 
  34.       Left            =   3480
  35.       Top             =   360
  36.       _ExtentX        =   847
  37.       _ExtentY        =   847
  38.       _Version        =   393216
  39.       Filter          =   "*.txt"
  40.       FilterIndex     =   1
  41.    End
  42.    Begin VB.Menu mnuFile 
  43.       Caption         =   "File"
  44.       Begin VB.Menu mnuNew 
  45.          Caption         =   "New"
  46.       End
  47.       Begin VB.Menu mnuOpen 
  48.          Caption         =   "Open"
  49.       End
  50.       Begin VB.Menu mnuSave 
  51.          Caption         =   "Save"
  52.       End
  53.       Begin VB.Menu mnuExit 
  54.          Caption         =   "Exit"
  55.       End
  56.    End
  57. Attribute VB_Name = "Form1"
  58. Attribute VB_GlobalNameSpace = False
  59. Attribute VB_Creatable = False
  60. Attribute VB_PredeclaredId = True
  61. Attribute VB_Exposed = False
  62. Dim fso As FileSystemObject
  63. Dim fs As TextStream
  64. Private Sub Form_Load()
  65. Set fso = CreateObject("Scripting.FileSystemObject")
  66. End Sub
  67. Private Sub Form_Resize()
  68. If Me.WindowState = vbMinimized Then Exit Sub
  69. Text1.Left = 50
  70. Text1.Top = 50
  71. Text1.Width = Form1.Width - 200
  72. Text1.Height = Form1.Height - 770
  73. End Sub
  74. Private Sub mnuExit_Click()
  75. End Sub
  76. Private Sub mnuNew_Click()
  77. Text1.Text = ""
  78. End Sub
  79. Private Sub mnuOpen_Click()
  80. CommonDialog1.ShowOpen
  81. Set fs = fso.OpenTextFile(CommonDialog1.FileName, ForReading)
  82. Text1.Text = fs.ReadAll
  83. End Sub
  84. Private Sub mnuSave_Click()
  85. CommonDialog1.ShowSave
  86. Set fs = fso.CreateTextFile(CommonDialog1.FileName, ForWriting)
  87. fs.Write Text1.Text
  88. End Sub
  89.